import { service } from "@/utils/request"
import qs from 'qs'
import type { SendPrice } from '@/interface/price'


export function allPrice(data: SendPrice[]) {
  return service({
    url: '/send/getAllPrice',
    method: 'POST',
    headers:{
      "Content-Type": "application/json"
    },
    data: JSON.stringify(data)
  })
}

export function saleInfoByYear() {
  return service({
    url: '/finance/groupByYear',
    method: 'GET'
  })
}

export function saleInfoByMonth(year:string) {
  return service({
    url: `/finance/groupByYearAndMonth?year=${year}`,
    method: 'POST'
  })
}
export function saleInfoByDay(year:string,month: string) {
  return service({
    url: `/finance/groupByYearAndMonthAndDay?year=${year}&month=${month}`,
    method: 'POST'
  })
}